
%% bare_conf.tex
%% V1.3
%% 2007/01/11
%% by Michael Shell
%% See:
%% http://www.michaelshell.org/
%% for current contact information.
%%
%% This is a skeleton file demonstrating the use of IEEEtran.cls
%% (requires IEEEtran.cls version 1.7 or later) with an IEEE conference paper.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
%% and
%% http://www.ieee.org/

%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE! 
%% User assumes all risk.
%% In no event shall IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including  **
%% ** renaming them and changing author support contact information. **
%%
%% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex,
%%                    bare_conf.tex, bare_jrnl.tex, bare_jrnl_compsoc.tex
%%*************************************************************************

% *** Authors should verify (and, if needed, correct) their LaTeX system  ***
% *** with the testflow diagnostic prior to trusting their LaTeX platform ***
% *** with production work. IEEE's font choices can trigger bugs that do  ***
% *** not appear when using other class files.                            ***
% The testflow support page is at:
% http://www.michaelshell.org/tex/testflow/



% Note that the a4paper option is mainly intended so that authors in
% countries using A4 can easily print to A4 and see how their papers will
% look in print - the typesetting of the document will not typically be
% affected with changes in paper size (but the bottom and side margins will).
% Use the testflow package mentioned above to verify correct handling of
% both paper sizes by the user's LaTeX system.
%
% Also note that the "draftcls" or "draftclsnofoot", not "draft", option
% should be used if it is desired that the figures are to be displayed in
% draft mode.
%
\documentclass[conference]{IEEEtran}
% Add the compsoc option for Computer Society conferences.
%
% If IEEEtran.cls has not been installed into the LaTeX system files,
% manually specify the path to it like:
% \documentclass[conference]{../sty/IEEEtran}





% Some very useful LaTeX packages include:
% (uncomment the ones you want to load)


% *** MISC UTILITY PACKAGES ***
%
%\usepackage{ifpdf}
% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional
% compilation based on whether the output is pdf or dvi.
% usage:
% \ifpdf
%   % pdf code
% \else
%   % dvi code
% \fi
% The latest version of ifpdf.sty can be obtained from:
% http://www.ctan.org/tex-archive/macros/latex/contrib/oberdiek/
% Also, note that IEEEtran.cls V1.7 and later provides a builtin
% \ifCLASSINFOpdf conditional that works the same way.
% When switching from latex to pdflatex and vice-versa, the compiler may
% have to be run twice to clear warning/error messages.






% *** CITATION PACKAGES ***
%
%\usepackage{cite}
% cite.sty was written by Donald Arseneau
% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package
% \cite{} output to follow that of IEEE. Loading the cite package will
% result in citation numbers being automatically sorted and properly
% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using
% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's
% \cite will automatically add leading space, if needed. Use cite.sty's
% noadjust option (cite.sty V3.8 and later) if you want to turn this off.
% cite.sty is already installed on most LaTeX systems. Be sure and use
% version 4.0 (2003-05-27) and later if using hyperref.sty. cite.sty does
% not currently provide for hyperlinked citations.
% The latest version can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/cite/
% The documentation is contained in the cite.sty file itself.






% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
  % \usepackage[pdftex]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../pdf/}{../jpeg/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
  % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
  % will default to the driver specified in the system graphics.cfg if no
  % driver is specified.
  % \usepackage[dvips]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../eps/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.eps}
\fi
% graphicx was written by David Carlisle and Sebastian Rahtz. It is
% required if you want graphics, photos, etc. graphicx.sty is already
% installed on most LaTeX systems. The latest version and documentation can
% be obtained at: 
% http://www.ctan.org/tex-archive/macros/latex/required/graphics/
% Another good source of documentation is "Using Imported Graphics in
% LaTeX2e" by Keith Reckdahl which can be found as epslatex.ps or
% epslatex.pdf at: http://www.ctan.org/tex-archive/info/
%
% latex, and pdflatex in dvi mode, support graphics in encapsulated
% postscript (.eps) format. pdflatex in pdf mode supports graphics
% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure
% that all non-photo figures use a vector format (.eps, .pdf, .mps) and
% not a bitmapped formats (.jpeg, .png). IEEE frowns on bitmapped formats
% which can result in "jaggedy"/blurry rendering of lines and letters as
% well as large increases in file sizes.
%
% You can find documentation about the pdfTeX application at:
% http://www.tug.org/applications/pdftex





% *** MATH PACKAGES ***
%
%\usepackage[cmex10]{amsmath}
% A popular package from the American Mathematical Society that provides
% many useful and powerful commands for dealing with mathematics. If using
% it, be sure to load this package with the cmex10 option to ensure that
% only type 1 fonts will utilized at all point sizes. Without this option,
% it is possible that some math symbols, particularly those within
% footnotes, will be rendered in bitmap form which will result in a
% document that can not be IEEE Xplore compliant!
%
% Also, note that the amsmath package sets \interdisplaylinepenalty to 10000
% thus preventing page breaks from occurring within multiline equations. Use:
%\interdisplaylinepenalty=2500
% after loading amsmath to restore such page breaks as IEEEtran.cls normally
% does. amsmath.sty is already installed on most LaTeX systems. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/





% *** SPECIALIZED LIST PACKAGES ***
%
%\usepackage{algorithmic}
% algorithmic.sty was written by Peter Williams and Rogerio Brito.
% This package provides an algorithmic environment fo describing algorithms.
% You can use the algorithmic environment in-text or within a figure
% environment to provide for a floating algorithm. Do NOT use the algorithm
% floating environment provided by algorithm.sty (by the same authors) or
% algorithm2e.sty (by Christophe Fiorio) as IEEE does not use dedicated
% algorithm float types and packages that provide these will not provide
% correct IEEE style captions. The latest version and documentation of
% algorithmic.sty can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/algorithms/
% There is also a support site at:
% http://algorithms.berlios.de/index.html
% Also of interest may be the (relatively newer and more customizable)
% algorithmicx.sty package by Szasz Janos:
% http://www.ctan.org/tex-archive/macros/latex/contrib/algorithmicx/




% *** ALIGNMENT PACKAGES ***
%
%\usepackage{array}
% Frank Mittelbach's and David Carlisle's array.sty patches and improves
% the standard LaTeX2e array and tabular environments to provide better
% appearance and additional user controls. As the default LaTeX2e table
% generation code is lacking to the point of almost being broken with
% respect to the quality of the end results, all users are strongly
% advised to use an enhanced (at the very least that provided by array.sty)
% set of table tools. array.sty is already installed on most systems. The
% latest version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/required/tools/


%\usepackage{mdwmath}
%\usepackage{mdwtab}
% Also highly recommended is Mark Wooding's extremely powerful MDW tools,
% especially mdwmath.sty and mdwtab.sty which are used to format equations
% and tables, respectively. The MDWtools set is already installed on most
% LaTeX systems. The lastest version and documentation is available at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/mdwtools/


% IEEEtran contains the IEEEeqnarray family of commands that can be used to
% generate multiline equations as well as matrices, tables, etc., of high
% quality.


%\usepackage{eqparbox}
% Also of notable interest is Scott Pakin's eqparbox package for creating
% (automatically sized) equal width boxes - aka "natural width parboxes".
% Available at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/eqparbox/





% *** SUBFIGURE PACKAGES ***
%\usepackage[tight,footnotesize]{subfigure}
% subfigure.sty was written by Steven Douglas Cochran. This package makes it
% easy to put subfigures in your figures. e.g., "Figure 1a and 1b". For IEEE
% work, it is a good idea to load it with the tight package option to reduce
% the amount of white space around the subfigures. subfigure.sty is already
% installed on most LaTeX systems. The latest version and documentation can
% be obtained at:
% http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/
% subfigure.sty has been superceeded by subfig.sty.



%\usepackage[caption=false]{caption}
%\usepackage[font=footnotesize]{subfig}
% subfig.sty, also written by Steven Douglas Cochran, is the modern
% replacement for subfigure.sty. However, subfig.sty requires and
% automatically loads Axel Sommerfeldt's caption.sty which will override
% IEEEtran.cls handling of captions and this will result in nonIEEE style
% figure/table captions. To prevent this problem, be sure and preload
% caption.sty with its "caption=false" package option. This is will preserve
% IEEEtran.cls handing of captions. Version 1.3 (2005/06/28) and later 
% (recommended due to many improvements over 1.2) of subfig.sty supports
% the caption=false option directly:
%\usepackage[caption=false,font=footnotesize]{subfig}
%
% The latest version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/subfig/
% The latest version and documentation of caption.sty can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/caption/




% *** FLOAT PACKAGES ***
%
%\usepackage{fixltx2e}
% fixltx2e, the successor to the earlier fix2col.sty, was written by
% Frank Mittelbach and David Carlisle. This package corrects a few problems
% in the LaTeX2e kernel, the most notable of which is that in current
% LaTeX2e releases, the ordering of single and double column floats is not
% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a
% single column figure to be placed prior to an earlier double column
% figure. The latest version and documentation can be found at:
% http://www.ctan.org/tex-archive/macros/latex/base/



%\usepackage{stfloats}
% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e
% the ability to do double column floats at the bottom of the page as well
% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in
% LaTeX2e). It also provides a command:
%\fnbelowfloat
% to enable the placement of footnotes below bottom floats (the standard
% LaTeX2e kernel puts them above bottom floats). This is an invasive package
% which rewrites many portions of the LaTeX2e float routines. It may not work
% with other packages that modify the LaTeX2e float routines. The latest
% version and documentation can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/sttools/
% Documentation is contained in the stfloats.sty comments as well as in the
% presfull.pdf file. Do not use the stfloats baselinefloat ability as IEEE
% does not allow \baselineskip to stretch. Authors submitting work to the
% IEEE should note that IEEE rarely uses double column equations and
% that authors should try to avoid such use. Do not be tempted to use the
% cuted.sty or midfloat.sty packages (also by Sigitas Tolusis) as IEEE does
% not format its papers in such ways.





% *** PDF, URL AND HYPERLINK PACKAGES ***
%
%\usepackage{url}
% url.sty was written by Donald Arseneau. It provides better support for
% handling and breaking URLs. url.sty is already installed on most LaTeX
% systems. The latest version can be obtained at:
% http://www.ctan.org/tex-archive/macros/latex/contrib/misc/
% Read the url.sty source comments for usage information. Basically,
% \url{my_url_here}.





% *** Do not adjust lengths that control margins, column widths, etc. ***
% *** Do not use packages that alter fonts (such as pslatex).         ***
% There should be no need to do such things with IEEEtran.cls V1.6 and later.
% (Unless specifically asked to do so by the journal or conference you plan
% to submit to, of course. )


% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}


\begin{document}
%
% paper title
% can use linebreaks \\ within to get better formatting as desired
\title{PintarOS : A Reconfigurable Multi-purpose Multi-Application Smart Card Operating System}


% author names and affiliations
% use a multiple column layout for up to three different
% affiliations
\author{\IEEEauthorblockN{Ricky Hariady}
\IEEEauthorblockA{School of Electrical Engineering and Informatics\\
Bandung Institute of Technology\\
Bandung, Indonesia 40135\\
Email: ricky.hariady@students.itb.ac.id}
\and
\IEEEauthorblockN{Arif Sasongko}
\IEEEauthorblockA{School of Electrical Engineering and Informatics\\
Bandung Institute of Technology\\
Bandung, Indonesia 40135\\
Email: asasongko@itb.ac.id}}

% conference papers do not typically use \thanks and this command
% is locked out in conference mode. If really needed, such as for
% the acknowledgment of grants, issue a \IEEEoverridecommandlockouts
% after \documentclass

% for over three affiliations, or if they all won't fit within the width
% of the page, use this alternative format:
% 
%\author{\IEEEauthorblockN{Michael Shell\IEEEauthorrefmark{1},
%Homer Simpson\IEEEauthorrefmark{2},
%James Kirk\IEEEauthorrefmark{3}, 
%Montgomery Scott\IEEEauthorrefmark{3} and
%Eldon Tyrell\IEEEauthorrefmark{4}}
%\IEEEauthorblockA{\IEEEauthorrefmark{1}School of Electrical and Computer Engineering\\
%Georgia Institute of Technology,
%Atlanta, Georgia 30332--0250\\ Email: see http://www.michaelshell.org/contact.html}
%\IEEEauthorblockA{\IEEEauthorrefmark{2}Twentieth Century Fox, Springfield, USA\\
%Email: homer@thesimpsons.com}
%\IEEEauthorblockA{\IEEEauthorrefmark{3}Starfleet Academy, San Francisco, California 96678-2391\\
%Telephone: (800) 555--1212, Fax: (888) 555--1212}
%\IEEEauthorblockA{\IEEEauthorrefmark{4}Tyrell Inc., 123 Replicant Street, Los Angeles, California 90210--4321}}




% use for special paper notices
%\IEEEspecialpapernotice{(Invited Paper)}




% make the title area
\maketitle


\begin{abstract}
%\boldmath
Smart card is basically complete computer system, but with limited capabilities. As in others computer system, smart card require an operating system in order to be usefull. This paper propose a reconfigurable multi-purpose multi-application operating system for smart card. Its reconfigurable so that it can be used in various smart card hardware. It also can be used to a wide range of application from a simple identity storing, to a more complex application such as healthcare, authentication, etc. It can be installed with a number of different application in one smart card. To support a complex application, card issuer can also deploy an additional application code to extend the card ability to handle application specific function.
\end{abstract}
% IEEEtran.cls defaults to using nonbold math in the Abstract.
% This preserves the distinction between vectors and scalars. However,
% if the conference you are submitting to favors bold math in the abstract,
% then you can use LaTeX's standard command \boldmath at the very start
% of the abstract to achieve this. Many IEEE journals/conferences frown on
% math in the abstract anyway.

% no keywords




% For peer review papers, you can put extra information on the cover
% page as needed:
% \ifCLASSOPTIONpeerreview
% \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
% \fi
%
% For peerreview papers, this IEEEtran command inserts a page break and
% creates the second title. It will be ignored for other modes.
\IEEEpeerreviewmaketitle




\section{Introduction to Smart Card}
% no \IEEEPARstart
% You must have at least 2 lines in the paragraph with the drop letter
% (should never be an issue)

% definitions, using, advantages
Smart card is a plastic card embedded with a computer chip that can store and transact data \cite{SCManagement:mohandes}. Nowadays, it has been widely used for ID card, banking, telecommunication, ticketing, pay-TV, etc. Its gain popularity because it can deliver mobility, robustness, and also security. Its tamper resistance makes it one of the mobile computing devices of choice \cite{SCOSPastPresentFuture:deville}.

% work principal
% meskipun memiliki kemampuan yang terbatas, smart card basically is a complete computer system. it has a microprocessor, memory system, and also IO for communication with external entities. terkadang smart card have coprocessor (biasanya for crypthographic) to membantu kerja microprocessor dalam mengerjakan fungsi-fungsi tertentu. the only difference with PC is smart card doesn't interract directly with the user (human) so it doesn't have human interface. It can be used by bantuan another computer called terminal, that communicate to smart card through a card reader melalui mekanisme APDU

Although smart card has a limited capability, it is basically a complete computer system. It has a microprocessor, memory system, and also IO to communicate to outside world. Some smart card even have co-processors to assist main microprocessor to perform special functions (mostly for crypthography) \cite{SCHandbook}. The only difference between smart card and general PC perhaps is smart card doesn't have human-machine interface so it can't interract directly with the user (human). It can only communicate with another host computer (also called terminal) using a special devices called card reader through a special communication protocol. Two widely used protocols for thic communication are called T=0 and T=1 by the standard \cite{SWHWIssue:selimis}. The basic relationship between a terminal and the smart card itself is of master and slave \cite{SCOS:yuqiang}. The terminal sends a command to smart card, the smart card executes the command and sends a response back to terminal.

% why needs software
% evolution (separation between OS and application)
% bagaimanapun, just like another computer system, without software smart card is just a plastic card. smart card need a software to mengerjakan function tertentu agar berguna bagian software ini kemudian disebuat juga sebagai Smart Card OS. meskipun bukanlah sebuah operating system utuh seperti Windows atau UNIX, sistem operasi ini penting dalam pengembangan smart card.
% pada awal dikembangkan, software ini ditanamkan secara langsung pada ROM dari smart card dan tidak ada pemisahan antara aplikasi dengan sistem operasi. akibatnya, dibutuhkan software khusus untuk setiap aplikasi dari smart card dan ini dilakukan pada saat manufacture. selain itu, akan menjadi susah untuk melakukan perubahan atau perbaikan apabila terdapat bug atau celah. dalam perkembangannya, pembuat smart card menyadari bahwa perlu dilakukan pemisahan antara sistem operasi dari aplikasi smart card. hampir seluruh smart card saat ini menggunakan pendekatan ini. Saat ini, biasanya fungsi-fungsi dasar smart card OS diletakkan pada ROM, namun kemudian dikostumisasi lagi kemudian yang disimpan pada EEPROM.

\section{Smart Card Operating System}

However, just like another computer system, smart card needs software to be useful. Otherwise, it is just a piece of plastic with an embedded processor in it. In the early of development of smart card in 1980's, this software is embedded directly into the ROM of the smart card and this was done at the time of semiconductor manufacture. Consequently, it would be difficult (or not possible at all) to make corrections or improvement if there are bugs or vulnerabilities found in the software.  There is no separation between the applications and the operating system so it takes a special software for each application. This makes application development process to be difficult and not efficient.

In later development, smart card manufactures realize that they need to separate the smart card software into operating system and applications. The smartcard manufacture just need to develop the operating system portion and embed it to smart card when it is manufactured, and smart card provider can develop and maintain the application later. They also carried out the applications from ROM to EEPROM so it can be altered at anytime. This shorten the time-to-market and make a clear distinction between card manufacture and card provider. Almost all of the smart card used today is using this approach.

% characteristic of SCOS
% karena keterbatas yang dimiliki smartcard, sistem operasinya juga harus di optimasi sesuai dengan penggunaannya. umumnya smartcard memiliki memory yang rendah, biasanya . akibatnya, smart card operating system harus dirancang se-efisien mungkin untuk menghasilkan footprint yang rendah. pada generasi awal, memory ini lebih rendah, sehingga smart card software seringkali harus ditulis dalam bahasa assembly. namun dalam perkembangannya, ruang memory smart card telah semakin besar, dan memungkinkan menggunakan bahasa yang lebih tinggi dalam mengimplementasikan sistem operasinya. umumnya sistem operasi smart card yang tersedia menggunakan bahasa C (bahasa ini juga yang akan digunakan pada pintar-os yang diusulkan nanti). 

Although it is not a complete operating system such as Windows or UNIX, the smart card operating system is an important part because it handles the basic operation of smart card and ensure that the smart card accomplish its function properly. Due to limitations of smart card, it's operating system must be optimized in accordance to its use. Smart card usually has a low memory. Consequently, smart card operating system must be designed as efficiently as possible to produce a low footprint. In the early generations, this memory is low enough, so the smart card software often must be written in assembly language. Nowadays, smart card memory space has been getting larger, and it allows the use of higher level language such as C or even Java. Lates smart card operating system is mostly implemented in C because ***. This language is also be used for the proposed smart card operating system. Moreover, smart cards are often used in environments which do not sterile and can interfere the hardware, so smart cards must be designed to be robust and reliable.

% selain itu, smart card harus dirancang agar robust and reliable. hal ini karena, smart card seringkali digunakan dalam linkungan yang tidak steril sehingga dapat menyebabkan kerusakan pada hardwarenya. sebagian besar dari sistem operasi smart card juga disimpan di dalam ROM, sehingga menjadi tidak mungkin untuk memperbaikinya apabila terjadi kesalahan setelah manufacture.

Smart cards also often have to be used for purposes that require high security. Consequently, the smart card OS must be carefully designed to be free of bugs and vulnerabilities to attacked. Security during program execution and protected access to data have the highest priority. This often requires OS design and implementation to be affected by the hardware platform used, as in dealing with the state of the EEPROM to ensure the integrity of stored data files. Thus, the design of smart card OS can never fully hardware-independent, as desired by the software developer.

% smart card juga seringkali harus digunakan untuk keperluan yang menuntut security. untuk itu smart card OS harus dirancang dengan teliti untuk bebas dari celah keamanan dari serangan. security during program execution and protected access to data have the highest priority. hal ini seringkali mengharuskan pembuat OS untuk dipengaruhi oleh hardware yang digunakan pada saat akan mengimplementasi OS yang dirancang, seperti dalam menangani state of EEPROM. akibatnya, perancangan smart card OS tidak pernah bisa hardware-independent secara penuh, sebagaimana diinginkan oleh pembuat software.

Other common limitation of smart cards is relatively low processing power. However, smart cards should be reactive and able to serve requests immediately (no more than 5 seconds as required by standard). Hence, The source code must be written using effective and optimized algorithms. Programs section which usually takes a relatively long time is  cryptographic algorithms, therefor the latest smart cards are usually equipped with a cryptographic co-processor, but it will certainly made the design to be more hardware-dependent.

% keterbatasan lainnya yang dimiliki smart card adalah kemampuan processing yang relatif rendah. namun begitu, smart card harus dapat melayani permintaan dengan segera (tidak lebih dari 5 detik sesuai standar ISO). untuk itu code operating system harus ditulis menggunakan algoritma yang efektif. bagian yang biasanya membutuhkan waktu yang relatif lama adalah dalam menjalankan algoritma kriptografi. untuk itu smart card terbaru biasanya telah dilengkapi dengan co-processor kriptografi, namun hal ini tentu akan membuat implementasi menjadi lebih tidak hardware-independent.

% smart card OS main function

%secara umum, smart card OS bertanggung jawab dalam menangani tugas
%hardware abstraction
%data transmission between smart card and terminal
%execute the command
%data storage (file system)
%controlling access to data
%menyediakan layanan security and cryptographic
%data integrity
%card management

In summary, the primary tasks of a smart card operating system are the following :

\begin{itemize}
  \item transferring data to and from the smart card.
  \item controlling the execution of commands.
  \item managing file.
  \item managing and executing cryptographic algorithms.
  \item managing and executing program code.
\end{itemize}


Furthermore, smart card OS also responsible to access control, ensure data integrity, and also for card management.


% SCOS divide into general purpose and dedicated
%berdasarkan penggunaannya, smart card OS dapat dibagi menjadi dua kelompok :
%general purpose, which hanya menyediakan generic command set yang cukup bagi hampir semua aplikasi
%dedicated COS, which memiliki command tersendiri sesuai dengan aplikasi

Based on the command sets used, smart card OS can be divided into two groups :

\begin{itemize}
  \item General purpose smart card OS, which features a generic command set in which various sequences can cover most applications, and
  \item Dedicated smart card OS, with commands designed for specific application and which can even contain the application itself.
\end{itemize}

% application divided into file-based and code-based application

% \section{Existing Smart Cars OS}

% \subsection{Java Card}
% Java card explanation

% \subsection{MultOS}
% MultOS explanation

\section{pintar-OS}

\subsection{Basic Idea}

% pintarOS dirancang sebagai sistem operasi smart card baru yang bersifat multi-purpose dan multi-aplikasi. sistem operasi ini merupakan gabungan dari tipe general purpose yang menggunakan command set yang telah ditentukan serta dedicated COS sehingga extensible untuk dikembangkan. hal ini memberikan keleluasaan bagi pengguna smart card dalam mengembangkan aplikasi.

% sebagaimana trend dalam pengembangan sistem operasi smart card, pintarOS dirancang sebagai sebuah sistem operasi yang generic, yang memiliki tingkat keterbebasan yang tinggi terhadap hardware sehingga tidak terbatas pada arsitektur komputasi tertentu. Meskipun sebagai awal dikembangkan untuk smart card berbasis 8051, pintarOS dirancang agar dapat dengan mudah diimplementasikan pada arsitektur mikroprocessor lainnya ataupun platform tertentu. 

% mengingat luasnya cakupan smart card yang tersedia, pintarOS haruslah dapat dikostumisasi sesuai keperluan dan kemampuan smart card yang ada, sehingga memiliki fleksibilitas yang tinggi. hal ini dapat dilakukan dengan merancang pintarOS secara modular, dimana module-module yang akan digunakan dapat rekonfigurasi pada saat diproduksi. sebagai contoh, smart card dapat dikonfigurasi untuk menggunakan protocol transmisi T0 saja, T1 saja, atau keduanya. demikian pula command set yang disediakan, file structure yang didukung, jumlah channel, serta algoritma-algoritma kriptografi yang akan digunakan. proses rekonfigurasi ini dapat dibayangkan seperti pada kompilasi kernel di sistem operasi Linux/UNIX.

% Dengan pendekatan modular ini juga, pintarOS dapat diperluas secara tidak terbatas dengan menambah module-module baru, seperti algoritma kriptografi khusus yang dikembangkan oleh pembuat smart card.

This paper proposed pintarOS, a new multi-purpose and multi-application operating system for smart card. This operating system is a combination of the type that uses a general (standard) command set (general-purpose) but also can be extended with specific command (dedicated COS). This provides extensive flexibility for users in developing smart card applications.

Following the trends in smart card operating systems, pintarOS designed as a generic operating system, which has to be not limited to a particular computing architecture and platform. Although it use 8051-based smart cards for initial development, pintarOS designed to be easily ported to other microprocessor architecture or platform.

Considering the wide scope of smart card applications, pintarOS need to has the ability to be customized as required by the application. And also because it will used in various hardware platform, it has to be reconfigurable to fit the smart card capabilities. This can be done by using modular design, where the system will consist of a number of modules that can be selected at the time of production/manufacture. For example, a smart card can be configured to use the transmission protocol T=0 only, T=1 only, or both. Similarly, we can choose the command set, the supported file structure, the number of channels, as well as cryptographic algorithms to be used. This reconfiguration process can be thought of like the kernel compilation in Linux/UNIX system. With this modular approach, pintarOS can be extended indefinitely by adding new modules, such as new cryptographic algorithm developed by the smart card provider, result in a very flexible system.

\subsection{Application Development Model}

% faktor lainnya yang turut menentukan keberhasilan sebuah sistem operasi smart card adalah kemudahan dalam mengembangkan aplikasi. sebagus apapun sistem operasi yang dihasilkan, apabila tidak menyediakan perangkat pengembangan yang baik, maka tidak akan digunakan. hal inilah yang menjadi salah satu alasan mengapa Java Card banyak digunakan sekarang. untuk itu pintar-OS dirancang bersama dengan perangkat pengembangan yang terintegrasi. 

% salah satu bentuk kemudahan yang ditawarkan adalah dengan memberi kebebasan kepada pengguna smart card akan jenis aplikasi yang akan digunakan. sebagaimana telah disebutkan, pintarOS merupakan gabungan dari tipe general purpose dan dedicated. sebagai sebuah general purpose, pintarOS mendukung aplikasi berbasis file dimana seluruh operasi dilakukan menggunakan urutan general command set. sebaliknya, sebagai dedicated OS ia juga mendukung aplikasi berbasis code, dimana pengembang aplikasi menentukan sendiri command set yang dapat digunakan. sebagai perpaduan dari kedua tipe, maka pintarOS mendukung pula aplikasi berbasis file yang dilengkapi dengan command set tambahan yang belum tersedia pada general command set. command set tambahan ini merupakan ASC.

% Pada pintarOS, pengembangan aplikasi ditawarkan untuk menggunakan project file yang berbasis xml. file project ini mengandung seluruh aspek yang dibutuhkan dari sebuah aplikasi smart card, seperti file-file yang akan dibuat dan digunakan, structure data dari file, hak akses, serta code program ASC apabila digunakan. Listing x menampilkan model file project xml yang ditawarkan, sementara Listing x menampilkan model kode sumber program ASC dalam C. Pengembangan aplikasi ini dilakukan sepenuhnya pada komputer terminal, baru kemudian diinstall ke smart card melalui prosedur instalasi aplikasi smart card sebagaimana ditampilkan pada Gambar x. Untuk memudahkan, maka prosedur ini dapat sepenuhnya dilakukan melalui sebuah program berbasis GUI.

One factor that also determines the success of a smart card operating system is the easyness to develop applications. No matter how enormous a system, it will not be success in the market if it does not provide a good application development environment. It is also the reason why Java Card is widely used around the world. Hence, pintarOS will be designed along with an integrated tools to develop the application easily.

PintarOS offered a high degree of freedom to the smart card provider to choose the type of application. As already mentioned, pintarOS is a combination of general-purpose and dedicated type smart card OS. As a general purpose type, pintarOS supports file-based application where all operations are performed using various sequence of general command. On the contrary, as a dedicated type it also supports code-based applications, where the application developer determines its own command set. As a combination of both types, then pintarOS supports file-based application equipped with an extra set of application specific commands (ASC).

Application later can be development using a XML-based project files. This project file contains all the necessary aspects of a smart card applications, such as the files to be created, the data structure of the file, permissions, and the ASC program code if needed. Listing x display offered xml project file model, while Listing x display models of ASC program source code in C. Application development is done entirely on the terminal terminal, which then installed into the smart card through a smart card application installation procedure as shown in Figure x. To make it easier, this procedure can be done through a fully GUI-based programs.

\subsection{Architecture}

% Gambar x menampilkan arsitektur sistem yang menggunakan pintarOS, which is a layered operating system. di layer paling dasar adalah hardware dari smart card sendiri, sementara di layer paling atas adalah aplikasi smart card. sistem operasi pintarOS berada diantaranya. akibatnya, aplikasi tidak dapat berhubungan langsung dengan hardware melainkan harus melalui service yang diberikan oleh OS. hal ini salah satunya untuk menjamin keamanan dan kehandalan dari smart card. 

Figure x display architecture of a smart card using pintarOS, as a layered system. At the lowermost layer is the hardware of the smart card itself, while in the top is the application layer. PintarOS operating system lies between. Consequently, the application can not make use of the hardware directly but it must be through services provided by the OS. It is is also to ensure the security and reliability of the smart card itself.

% sebagian dari sistem operasi pintarOS ini diletakkan pada memory ROM dari smart card : HAL Driver, transmission handler, general command handler, etc. sementara sebagian lainnya diletakkan pada EEPROM. bagian yang diletakkan pada pada ROM merupakan modules dari pintarOS yang telah dipilih saat konfigurasi dan tidak akan dirubah setelah manufacture. sementara yang diletakkan pada EEPROM merupakan bagian yang dapat berubah setelah manufacture seperti file table dari file system, kunci keamanan, dll.

As indicated in the Figure, parts of the operating system are located in the ROM memory of the smart card, while others are placed in EEPROM. Part of operating system that located in ROM are modules which is selected in the configuration phase and will not be changed after manufacture. Its include HAL Driver, transmission handler, general command handler, etc. Otherwise, part that placed on EEPROM can be changed after manufacture, such as table files of file system, security keys, etc.

% Sebagaimana telah disebutkan, pintarOS dirancang secara modular. modul-modul utama dari pintarOS ini ditampilkan pada Gambar x. Modul-modul ini dipisahkan menjadi dua bagian, yaitu hardware-dependent dan hardware-independent. bagian hardware-dependent terdiri dari modul-modul hardware abstraction layer. modul-modul ini berfungsi seperti driver yang mengabstraksi hardware pada software sehingga fungsi-fungsi hardware dapat digunakan dengan cara yang sama sebagai layanan oleh modul lainnya meskipun menggunakan platform hardware yang berbeda.

As already described, pintarOS is designed in a modular fashion. The main (core) modules are shown in Figure x. These modules are separated into two parts, namely hardware dependent and hardware independent. Hardware dependent part consists of hardware abstraction layer (HAL) modules. The other modules belong to hardware-independent part. Following are explanation of each module :

\begin{description}
  \item[Hardware Abstraction Layer (HAL)] \hfil \\
provides an abstraction of the available hardware so that hardware-related functions can be used in the same way to upper modules despite using different hardware platforms.

  \item[Transmission Handler]  \hfil \\
responsible to handle selected transmission protocol (T = 0 or T = 1) to communicate with the terminal.

  \item[Command interpreter]  \hfil \\
responsible to interpret the contents of the command APDU and call the appropriate command handler. Each instruction, such as the ISO 7816-4 standard instruction (SELECT, READ, WRITE, VERIFY, etc.), as well as application spesific command (ASC), each own a command handler respectively. Call vector of the each command handle stored in the command maps located in EEPROM so that the command set can be added at any time if needed. If the command interpreter found the corresponding instructions on the command maps, it will then call the appropriate command handler.

  \item[Command Handler]  \hfil \\
will execute the instruction requested by the command APDU. Each instruction will be handled with the same approach. Command Handler will execute the corresponding instructions based on the parameters contained in the APDU Command. Execution results are then stored as a Response Type, which will then be translated by the Response Manager to appropriate  value SW1 | SW2. Similarly, if the execution produces data it will be stored as Response Data.

  \item[Manager response]  \hfil \\
responsible to form the response APDU. The SW1 and SW2 value generated corresponding to Response Type derived from the command handler / applications.

  \item[File System]  \hfil \\
handles everything associated with the file. Structure of the file system is stored on the File Tree, while the session manager stores information about the files, such as selected file, the state of the file, etc \ldots

  \item[Crypto Lib]  \hfil \\
provide cryptography service that can be used by the others such as command interpreter or a command handler.

\end{description}

% Transmission handler bertanggung jawab menangani protokol transmisi yang digunakan (T=0 atau T=1) untuk berkomunikasi dengan terminal.

% Command interpreter bertanggung jawab menerjemahkan isi command APDU dan memanggil command handler yang sesuai. Setiap instruksi, seperti instruksi standar ISO 7816-4 (SELECT, READ, WRITE, VERIFY, dll), maupun application spesific command (ASC), memiliki command handler masing-masing. cmd maps menyimpan call vector dari command handler dari seluruh instruksi , dan disimpan pada EEPROM sehingga command set dapat ditambahkan sewaktu-waktu apabila kebutuhan. Apabila command interpreter menemukan instruksi yang dimaksud pada cmd maps, maka command interpreter akan memanggil command handler yang sesuai.

% Command Handler akan melaksanakan instruksi yang diminta oleh command APDU. Setiap instruction akan ditangani dengan pendekatan yang sama. Command Handler yang sesuai akan menjalankan instruksi yang diminta, berdasarkan pada parameter-parameter yang terdapat pada Command APDU yang disimpan sebagai APDU resources. Status hasil eksekusi kemudian disimpan kembali sebagai APDU sebagai Response Type, yang kemudian akan diterjemahkan oleh Response Manager menjadi nilai SW1|SW2 yang sesuai. Demikian pula apabila eksekusi menghasilkan data yang disimpan pada APDU resources sebagai Response Data.

% Respons Manager berfungsi membentuk respons APDU. Nilai SW1 dan SW2 digenerate sesuai respons type yang disimpan di APDU resources yang berasal dari command handler / aplikasi.

% File System berfungsi menangani seluruh keperluan yang berhubungan dengan file. Struktur file system disimpan pada File Tree, sementara file manager menyimpan informasi mengenai file, seperti file yang sedang dipilih, state dari file, dll.

% Crypto Lib menyediakan fungsi-fungsi layanan cryptografi yang dapat digunakan oleh command interpreter untuk menangani secure message, maupun command handler.

% pintarOS merupakan sebuah state-oriented system, yang akan bekerja berdasarkan state-state tertentu, menggunakan statechart sebagaimana ditampilkan pada Gambar x. Saat pertama memperoleh daya, smart card akan menjalankan prosedur yang dinamakan ATR, untuk mengatur sejumlah parameter yang akan digunakan selanjutnya bersama terminal. selanjutnya smart card akan menunggu hingga terminal mengirimkan command dalam bentuk command APDU. command ini kemudian akan diinterpretasikan oleh command interpreter, yang apabila dikenali akan dilaksanakan oleh command handler. hasil eksekusi kemudian akan diubah menjadi response APDU yang kemudian dikirim ke terminal. selanjutnya smart card akan menunggu command dari terminal kembali.

\subsection{State Machine}
Smart card is a state-oriented system which work based on specific state. pintarOS using the statechart as shown in Figure x. When first powered, smart cards will run an initialize procedure called ATR (Answer-To-Reset), to set a number of parameters that will be used later with the terminal. When initialization is completed, smart card will wait until the terminal sends a command in the form of a command APDU. This command will then be interpreted by the command interpreter, which if identified will be execute by the command handler. Execution results will then be converted into corresponding response APDU before being sent to the terminal. Then, smart card will be waiting again for the next command from the terminal.

% An example of a floating figure using the graphicx package.
% Note that \label must occur AFTER (or within) \caption.
% For figures, \caption should occur after the \includegraphics.
% Note that IEEEtran v1.7 and later has special internal code that
% is designed to preserve the operation of \label within \caption
% even when the captionsoff option is in effect. However, because
% of issues like this, it may be the safest practice to put all your
% \label just after \caption rather than within \caption{}.
%
% Reminder: the "draftcls" or "draftclsnofoot", not "draft", class
% option should be used if it is desired that the figures are to be
% displayed while in draft mode.
%
%\begin{figure}[!t]
%\centering
%\includegraphics[width=2.5in]{myfigure}
% where an .eps filename suffix will be assumed under latex, 
% and a .pdf suffix will be assumed for pdflatex; or what has been declared
% via \DeclareGraphicsExtensions.
%\caption{Simulation Results}
%\label{fig_sim}
%\end{figure}

% Note that IEEE typically puts floats only at the top, even when this
% results in a large percentage of a column being occupied by floats.


% An example of a double column floating figure using two subfigures.
% (The subfig.sty package must be loaded for this to work.)
% The subfigure \label commands are set within each subfloat command, the
% \label for the overall figure must come after \caption.
% \hfil must be used as a separator to get equal spacing.
% The subfigure.sty package works much the same way, except \subfigure is
% used instead of \subfloat.
%
%\begin{figure*}[!t]
%\centerline{\subfloat[Case I]\includegraphics[width=2.5in]{subfigcase1}%
%\label{fig_first_case}}
%\hfil
%\subfloat[Case II]{\includegraphics[width=2.5in]{subfigcase2}%
%\label{fig_second_case}}}
%\caption{Simulation results}
%\label{fig_sim}
%\end{figure*}
%
% Note that often IEEE papers with subfigures do not employ subfigure
% captions (using the optional argument to \subfloat), but instead will
% reference/describe all of them (a), (b), etc., within the main caption.


% An example of a floating table. Note that, for IEEE style tables, the 
% \caption command should come BEFORE the table. Table text will default to
% \footnotesize as IEEE normally uses this smaller font for tables.
% The \label must come after \caption as always.
%
%\begin{table}[!t]
%% increase table row spacing, adjust to taste
%\renewcommand{\arraystretch}{1.3}
% if using array.sty, it might be a good idea to tweak the value of
% \extrarowheight as needed to properly center the text within the cells
%\caption{An Example of a Table}
%\label{table_example}
%\centering
%% Some packages, such as MDW tools, offer better commands for making tables
%% than the plain LaTeX2e tabular which is used here.
%\begin{tabular}{|c||c|}
%\hline
%One & Two\\
%\hline
%Three & Four\\
%\hline
%\end{tabular}
%\end{table}


% Note that IEEE does not put floats in the very first column - or typically
% anywhere on the first page for that matter. Also, in-text middle ("here")
% positioning is not used. Most IEEE journals/conferences use top floats
% exclusively. Note that, LaTeX2e, unlike IEEE journals/conferences, places
% footnotes above bottom floats. This can be corrected via the \fnbelowfloat
% command of the stfloats package.



\section{Epilogue}

This paper is an introduction to a still on-progress work on design and implementation of a smart card operating system. it's build upon the needs for a generic operating system in the midst of the many emerging smart card platform. As the work is just beginning, there is still much work to be done, but so far it has shown that it has a compelling future.




% conference papers do not normally have an appendix


% use section* for acknowledgement
% \section*{Acknowledgment}


% The authors would like to thank...





% trigger a \newpage just before the given reference
% number - used to balance the columns on the last page
% adjust value as needed - may need to be readjusted if
% the document is modified later
%\IEEEtriggeratref{8}
% The "triggered" command can be changed if desired:
%\IEEEtriggercmd{\enlargethispage{-5in}}

% references section

% can use a bibliography generated by BibTeX as a .bbl file
% BibTeX documentation can be easily obtained at:
% http://www.ctan.org/tex-archive/biblio/bibtex/contrib/doc/
% The IEEEtran BibTeX style support page is at:
% http://www.michaelshell.org/tex/ieeetran/bibtex/
%\bibliographystyle{IEEEtran}
% argument is your BibTeX string definitions and bibliography database(s)
%\bibliography{IEEEabrv,../bib/paper}
%
% <OR> manually copy in the resultant .bbl file
% set second argument of \begin to the number of references
% (used to reserve space for the reference number labels box)
\begin{thebibliography}{1}

\bibitem{SCOS:yuqiang}
Chen Yuqiang, Guo Jianlan, Hu Xuanzi, and Liu Liang,''Design and Implementation of Smart Card COS,''\emph{Computer Application and System Modelling(ICCASM), 2010 International Conference on},22-24 Oct. 2010.

\bibitem{SCOSPastPresentFuture:deville}
Damien Deville, Antoine Galland, Gilles Grimaud, Sebastien Jean,''Smart Card Operating Systems: Past, Present and Future,''\emph{5 th NORDU/USENIX Conference, In Proceedings of the}, 2003.

\bibitem{SWHWIssue:selimis}
George Selimis, Apostolos Faournaris, George Kostopoulos, and Odysseas Koufopavlou,''Software and Hardware Issue in Smart Card Technology,''\emph{Communications Surveys \& Tutorial, IEEE},3rd Quarter 2009.

\bibitem{SCandTheirOS:hengguo}
Heng Guo,''Smart Cards and their Operating Systems.''

\bibitem{SCManagement:mohandes}
Mohamed Mohandes,''A Smart Card Management and Application System,''\emph{Progress in Informatics and Computing (PIC), 2010 IEEE International Conference on}, 10-12 Dec. 2010.

\bibitem{SCHandbook}
R. Wolfgang and E. Wolfgang, \emph{Smart Card Handbook}, John Wiley and Sons, 3rd Edition, 2004.

\bibitem{SCApplications}
R. Wolfgang, \emph{Smart Card Applications: Design models for using and programming smart cards}, John Wiley and Sons, 2007.


\end{thebibliography}




% that's all folks
\end{document}


